* {
    margin: 0;
    padding: 0;
}

body {
    background-color: #fff;
}

a {
    text-decoration: none;
}

li {
    list-style: none;
}

.wrapper {
    width: 540px;
    min-height: 1500px;
    /* background-color: #ccc; */
    margin: 0 auto;
}

.wrapper .search_box {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 540px;
    height: 45px;
    padding: 0 13px 0 8px;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    background-color: #fff;
    box-sizing: border-box;
}

.wrapper .search_box input {
    flex: 1;
    height: 26px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding-left: 15px;
}



.wrapper .search_box a {
    width: 28px;
    font-size: 12px;
    color: #2eaae0;
    margin-left: 10px;
}

.wrapper .search_box a .icon {
    display: block;
    width: 23px;
    height: 23px;
    /* 此时精灵图是2倍图 ，要使用的话需要缩放2倍，
    坐标也要缩放 */
    background: url(../images/sprite.png) -59px -194px;
    background-size: 104px auto;
}

.focus {
    margin-top: 45px;
    margin-bottom: 4px;
}

img {
    width: 540px;
}

.top_nav {
    margin: 0 5px;
    height: 64px;
    background-color: #fff;
    border-radius: 10px;
}

.top_nav ul {
    display: flex;
    height: 64px;
}

.top_nav ul li {
    flex: 1;
}

.top_nav ul li a {
    display: flex;
    /* 改变主轴方向：纵向排列 */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 64px;
    font-size: 12px;
    color: #222;
}

.top_nav .icon {
    width: 32px;
    height: 32px;
    margin-bottom: 4px;
    background: url(../images/localnav_bg.png) 0 0;
    background-size: 32px auto;
}

.top_nav li:nth-child(2) .icon {
    background-position: 0 -32px;
}

.top_nav li:nth-child(3) .icon {
    background-position: 0 -64px;
}

.top_nav li:nth-child(4) .icon {
    background-position: 0 -96px;
}

.top_nav li:nth-child(5) .icon {
    background-position: 0 -128px;
}

.main_nav {
    margin-top: 4px;
    height: 270px;
    overflow: hidden;
    border-radius: 10px;
    background-color: pink;
}

.main_nav .nav_item {
    display: flex;
    height: 88px;
}

.main_nav .nav_item .items {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
    line-height: 44px;
}

.main_nav .nav_item .items a {
    flex: 1;
    color: #fff;
}

.main_nav .nav_item .items:nth-child(2) {
    border-left: 1px solid #fff;
    border-right: 1px solid #fff;
}

.main_nav .nav_item .items:first-child a {
    background: url(../images/hotel.png) no-repeat bottom;
    background-size: 121px auto;
}

.main_nav .nav_item .items:nth-child(n+2) a:first-child {
    border-bottom: 1px solid #fff;
}

.main_nav .nav_item:first-child {
    background-image: linear-gradient(to right, #fa5a56, #fa9a4d);
}

.main_nav .nav_item:nth-child(2) {
    margin: 3px 0;
    background-image: linear-gradient(to right, #4b8fed, #53bbed);
}

.main_nav .nav_item:last-child {
    background-image: linear-gradient(to right, #35c3aa, #6cd558);
}

/* .main_nav .nav_item:nth-child(2) .items:first-child a i {
    background: url(../images/sprite.png) 0 -592px;

    background-size: 100px auto;
} */

/* 生活服务导航 */
.service {
    height: 117px;
    margin: 4px 4px 7px 4px;
    border: 1px solid #cfcfcf;
    border-top: none;
    border-radius: 10px;
    background-color: #fff;
}

.service ul {
    display: flex;
    flex-wrap: wrap;
    height: 117px;
}

.service ul li {
    /* flex: 1; 此时不能使用  数字是用份数来划分的。等分后一行还是可以放下*/

    flex: 20%;
    /* 没设置高度所以侧轴拉伸 */
    /* background-color: pink; */
}

.service ul li a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #222;
    font-size: 12px;
}

.service ul li a .icon {
    width: 24px;
    height: 24px;
    margin-bottom: 10px;
    background: url(../images/subnav-bg.png)0 0;
    background-size: 24px auto;
}

.service ul li:nth-child(2) .icon {
    background-position: 0 -24px;
}